<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilpdi: xilpdi.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilpdi
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilpdi_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilpdi.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This is the C file which contains APIs for reading PDI image. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
</p>
<hr/>
<p>
1.00  kc   12/21/2017 Initial release
1.01  bsv  04/08/2019 Added support for secondary boot device parameters
      bsv  07/30/2019 Renamed XilPdi_ReadAndValidateImgHdrTbl to
                                                XilPdi_ReadImgHdrTbl
      rm   28/08/2019 Added APIs for retrieving delay load and delay handoff
                                        params
1.02  bsv  29/11/2019 Added support for smap bus width word in partial pdis
      vnsl 26/02/2020 Added support to read DPA CM Enable field in meta headers
      vnsl 01/03/2020 Added support to read PufHeader from Meta Headers and
                                        partition headers
      vnsl 12/04/2020 Added support to read BootHdr Auth Enable field in
                                        boot header
1.03  bsv  07/29/2020 Updated function headers
      kpt  07/30/2020 Added check to validate number of images
      bm   09/29/2020 Code cleanup
      kpt  10/19/2020 Added support to validate checksum of image headers and
                      partition headers
1.04  td   11/23/2020 Coverity Warning Fixes
      bm   02/12/2021 Updated logic to use BootHdr directly from PMC RAM
      ma   03/24/2021 Redirect XilPdi prints to XilLoader
1.05  bm   07/08/2021 Code cleanup
      bsv  08/17/2021 Code clean up
1.06  kpt  12/13/2021 Replaced Xil_SecureMemCpy with Xil_SMemCpy
      kpt  02/01/2022 Updated XilPdi_ReadBootHdr prototype
1.07  skd  04/21/2022 Misra-C violation Rule 14.3 fixed
      bsv  07/06/2022 Added API to read Optional data from Metaheader
      bsv  07/08/2022 Code changes related to Optional data in IHT
      bm   07/13/2022 Added compatibility check for In-Place PLM Update
1.08  ng   11/11/2022 Updated doxygen comments
      dd   03/16/2023 Misra-C violation Rule 17.8 fixed
      dd   03/28/2023 Updated doxygen comments
      ng   03/30/2023 Updated algorithm and return values in doxygen comments
      sk   05/31/2023 Updated Xilpdi_ReadImgHdrTbl to use MetaHdrOfst from
                      MetaHdr structure
      am   07/03/2023 Updated XilPdi_ReadIhtAndOptionalData to store partition hashes
      dd   09/08/2023 Misra-C violation Rule 12.1 fixed
      har  02/16/2024 Modified XilPdi_SearchOptionalData as non-static function
      am   03/02/2024 Updated MH optimization changes to XilPdi_StoreDigestTable
      sk   03/13/2024 Fixed doxygen comments format
1.10  ng   04/30/2024 Fixed doxygen grouping
      ng   07/02/2024 Removed dependency on xilplmi library
      kpt  10/25/2024 Add SMAP_BUS_WIDTH_LENGTH while calculationg optional data
                      start address
1.11  kpt  11/05/2024 Add XilPdi_ReadOptionalData to read optional data
      pre  12/09/2024 use PMC RAM for PDI instance instead of PPU1 RAM</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gacf4b60f3bfd29d0d200e4f218b74dcdf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#gacf4b60f3bfd29d0d200e4f218b74dcdf">XilPdi_ValidateChecksum</a> (const void *Buffer, u32 Length)</td></tr>
<tr class="memdesc:gacf4b60f3bfd29d0d200e4f218b74dcdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to validate the word checksum for the Image Header table and Partition Headers.  <a href="group__xilpdi__apis.html#gacf4b60f3bfd29d0d200e4f218b74dcdf">More...</a><br/></td></tr>
<tr class="separator:gacf4b60f3bfd29d0d200e4f218b74dcdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga797b37ca16b6096549489adff97e5dfc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga797b37ca16b6096549489adff97e5dfc">XilPdi_ValidateImgHdrTbl</a> (const <a class="el" href="struct_xil_pdi___img_hdr_tbl.html">XilPdi_ImgHdrTbl</a> *ImgHdrTbl)</td></tr>
<tr class="memdesc:ga797b37ca16b6096549489adff97e5dfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks the fields of the Image Header Table and validates them.  <a href="group__xilpdi__apis.html#ga797b37ca16b6096549489adff97e5dfc">More...</a><br/></td></tr>
<tr class="separator:ga797b37ca16b6096549489adff97e5dfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68f9d9d52845d0060f3a12877e54e1cf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga68f9d9d52845d0060f3a12877e54e1cf">XilPdi_ValidatePrtnHdr</a> (const <a class="el" href="struct_xil_pdi___prtn_hdr.html">XilPdi_PrtnHdr</a> *PrtnHdr)</td></tr>
<tr class="memdesc:ga68f9d9d52845d0060f3a12877e54e1cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function validates the Partition Header.  <a href="group__xilpdi__apis.html#ga68f9d9d52845d0060f3a12877e54e1cf">More...</a><br/></td></tr>
<tr class="separator:ga68f9d9d52845d0060f3a12877e54e1cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab95449e9eb9805839f99e2b4aa107313"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#gab95449e9eb9805839f99e2b4aa107313">XilPdi_ReadBootHdr</a> (const <a class="el" href="struct_xil_pdi___boot_hdr.html">XilPdi_BootHdr</a> **BootHdrPtr)</td></tr>
<tr class="memdesc:gab95449e9eb9805839f99e2b4aa107313"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads the boot header.  <a href="group__xilpdi__apis.html#gab95449e9eb9805839f99e2b4aa107313">More...</a><br/></td></tr>
<tr class="separator:gab95449e9eb9805839f99e2b4aa107313"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e8b30c329673e17c9068780d5039b62"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga0e8b30c329673e17c9068780d5039b62">XilPdi_ReadImgHdrTbl</a> (<a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:ga0e8b30c329673e17c9068780d5039b62"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function Reads the Image Header Table.  <a href="group__xilpdi__apis.html#ga0e8b30c329673e17c9068780d5039b62">More...</a><br/></td></tr>
<tr class="separator:ga0e8b30c329673e17c9068780d5039b62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga06f73224852f1c65b02cbcfae050385b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga06f73224852f1c65b02cbcfae050385b">XilPdi_ReadIhtAndOptionalData</a> (<a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr, u8 PdiType)</td></tr>
<tr class="memdesc:ga06f73224852f1c65b02cbcfae050385b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads IHT and optional data in Image Header Table.  <a href="group__xilpdi__apis.html#ga06f73224852f1c65b02cbcfae050385b">More...</a><br/></td></tr>
<tr class="separator:ga06f73224852f1c65b02cbcfae050385b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d9a4d9527cebbe53947e863c88cab1e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga3d9a4d9527cebbe53947e863c88cab1e">XilPdi_ReadOptionalData</a> (<a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr, u8 PdiType)</td></tr>
<tr class="memdesc:ga3d9a4d9527cebbe53947e863c88cab1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads optional data in Image Header Table.  <a href="group__xilpdi__apis.html#ga3d9a4d9527cebbe53947e863c88cab1e">More...</a><br/></td></tr>
<tr class="separator:ga3d9a4d9527cebbe53947e863c88cab1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3bac0965e4b613497a5126a4e34feae1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga3bac0965e4b613497a5126a4e34feae1">XilPdi_StoreDigestTable</a> (<a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:ga3bac0965e4b613497a5126a4e34feae1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function stores digest table for given data Id.  <a href="group__xilpdi__apis.html#ga3bac0965e4b613497a5126a4e34feae1">More...</a><br/></td></tr>
<tr class="separator:ga3bac0965e4b613497a5126a4e34feae1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99aeeb01dc13465959103fa29625923a"><td class="memItemLeft" align="right" valign="top">u64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga99aeeb01dc13465959103fa29625923a">XilPdi_SearchOptionalData</a> (u64 StartAddress, u64 EndAddress, u32 DataId)</td></tr>
<tr class="memdesc:ga99aeeb01dc13465959103fa29625923a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function search offset of optional data address.  <a href="group__xilpdi__apis.html#ga99aeeb01dc13465959103fa29625923a">More...</a><br/></td></tr>
<tr class="separator:ga99aeeb01dc13465959103fa29625923a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab4d2ba6eeeac98dd13665d92c892a5ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_xil_pdi___prtn_hash_info.html">XilPdi_PrtnHashInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#gab4d2ba6eeeac98dd13665d92c892a5ac">XilPdi_IsPrtnHashPresent</a> (u32 PrtnNum, u32 HashTableSize)</td></tr>
<tr class="memdesc:gab4d2ba6eeeac98dd13665d92c892a5ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks if partition hash is present.  <a href="group__xilpdi__apis.html#gab4d2ba6eeeac98dd13665d92c892a5ac">More...</a><br/></td></tr>
<tr class="separator:gab4d2ba6eeeac98dd13665d92c892a5ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab206394653dbbd10d5fbdbb41832c8e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#gaab206394653dbbd10d5fbdbb41832c8e">XilPdi_ReadImgHdrs</a> (const <a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:gaab206394653dbbd10d5fbdbb41832c8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads the Image Headers.  <a href="group__xilpdi__apis.html#gaab206394653dbbd10d5fbdbb41832c8e">More...</a><br/></td></tr>
<tr class="separator:gaab206394653dbbd10d5fbdbb41832c8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34716af70cf4846e312a414d760d9e1b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga34716af70cf4846e312a414d760d9e1b">XilPdi_ReadPrtnHdrs</a> (const <a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:ga34716af70cf4846e312a414d760d9e1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads the Partition Headers.  <a href="group__xilpdi__apis.html#ga34716af70cf4846e312a414d760d9e1b">More...</a><br/></td></tr>
<tr class="separator:ga34716af70cf4846e312a414d760d9e1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab201600dc6af30b8ca72b6fd0109767c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#gab201600dc6af30b8ca72b6fd0109767c">XilPdi_VerifyPrtnHdrs</a> (const <a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:gab201600dc6af30b8ca72b6fd0109767c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function verifies Partition Headers.  <a href="group__xilpdi__apis.html#gab201600dc6af30b8ca72b6fd0109767c">More...</a><br/></td></tr>
<tr class="separator:gab201600dc6af30b8ca72b6fd0109767c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3351549fd88876c437726037b8bd5ca3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilpdi__apis.html#ga3351549fd88876c437726037b8bd5ca3">XilPdi_VerifyImgHdrs</a> (const <a class="el" href="struct_xil_pdi___meta_hdr.html">XilPdi_MetaHdr</a> *MetaHdrPtr)</td></tr>
<tr class="memdesc:ga3351549fd88876c437726037b8bd5ca3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function verifies Image headers.  <a href="group__xilpdi__apis.html#ga3351549fd88876c437726037b8bd5ca3">More...</a><br/></td></tr>
<tr class="separator:ga3351549fd88876c437726037b8bd5ca3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
